
package com.ccsoft.atools.service;
import com.ccsoft.atools.utils.Example;
import com.ccsoft.atools.model.AssBaseSimple;
import java.util.List;
import java.util.Optional;

/**
 * @Description : 服务层接口，由代码生成器自动生成
 * @Author : chanchaw
 * @Date : 2023-4-3 13:21:19
 */
public interface AssBaseSimpleService {
    AssBaseSimple insert(AssBaseSimple record);

    AssBaseSimple insertSelective(AssBaseSimple record);

    List<AssBaseSimple> multiInsert(List<AssBaseSimple> list);

    int updateByPrimaryKey(AssBaseSimple record);

    int updateByPrimaryKeySelective(AssBaseSimple record);

    // 根据主键删除
    int deleteByPrimaryKey(Integer iid);
    // 根据主键查询
    AssBaseSimple selectByPrimaryKey(Integer iid);

    List<AssBaseSimple> selectAll();

    AssBaseSimple save(AssBaseSimple record);
    List<AssBaseSimple> multiSave(List<AssBaseSimple> list);

    //================= 下面是默认方法 ==================
    default void checkEntityNotNull(AssBaseSimple record){// 返回true表示合法，可继续
        if(record == null) throw new RuntimeException("无法保存空数据！");
    }

    default AssBaseSimple fullFill(AssBaseSimple record){
        return record;
    }

    default void doBeforeInsert(AssBaseSimple record){}
    default void doAfterInsert(AssBaseSimple record){}
    List<AssBaseSimple> selectByExample(Example<AssBaseSimple> example);
    //=================以上是自动生成的代码，自定义代码请写在下面==================

    List<AssBaseSimple> getByCategory(String category);
}